import {ref} from "vue"
import {defineStore} from "pinia"

export const useUserStore = defineStore("user", () => {
    const token = ref<string>()
    
    const isHr = ref<boolean>()
    const isManager = ref<boolean>()

    function logout() {
        token.value = undefined
        isHr.value = undefined
        isManager.value = undefined
    }

    return {token, isHr, isManager, logout}
}, {
    unistorage: true
})
